#include "XgW32ProcessModule.h"
#include "XgW32Process.h"

XgW32ProcessModule::XgW32ProcessModule()
{
}

XgW32ProcessModule::XgW32ProcessModule(HMODULE hModule, DWORD pid)
: _pid(pid)
{
	_hModule = hModule;
	XgW32Process proc(_pid);
	_name = proc.getModuleName(hModule);
	_path = proc.getModulePath(hModule);
	
	xg_str2lower(_name);
	xg_str2lower(_path);
}

XgW32ProcessModule::XgW32ProcessModule(TSTRING name, TSTRING path, DWORD pid)
: _name(name), _path(path), _pid(pid)
{
	xg_str2lower(_name);
	xg_str2lower(_path);
}

XgW32ProcessModule::XgW32ProcessModule(const XgW32ProcessModule& module)
: _pid(module._pid)
{
	_hModule = module._hModule;
	_name = module._name;
	_path = module._path;
}

XgW32ProcessModule::~XgW32ProcessModule(void)
{
}

TSTRING XgW32ProcessModule::name()
{
	return _name;
}

TSTRING XgW32ProcessModule::path()
{
	return _path;
}